<!-- HTML5 sekce pro články -->
      <section id="content">
        <div class="block aside">
          <div class="block-left">
            <article class="article">
              <header>
                <h2 class=""><?php echo $article->title ?></h2>
              </header>
              <section>
                <?php echo $article->text ?>
              </section>
              <div class="article-bottom article-bottom-simple"><span class="float-left"><img src="<?php echo url::base() ?>media/img/icons/mini_hearth.png" alt="Oblíbený"><strong>13</strong><img src="<?php echo url::base() ?>media/img/icons/mini_bubble.png" alt="Komentářů"><strong>1</strong></span></div>
            </article>                                      
            <div class="clear-both"></div>            
          </div>          
          <aside class="block-right">
            <h3><?php echo StrFTime("%d. %B %Y", $article->date); ?></h3>
            <h3 class="min" style="text-align:left">Kategorie</h3>
            <div class="aside-item-line">
            <?php
            $in_category_final = array();
            $category_names = array();

            foreach ($article->articles_category->find_all() as $cat_item) {
              $in_category = ORM::factory('articles_category', $cat_item)->article->find_all()->as_array();
              $in_category_final = Arr::merge($in_category_final, $in_category);
              $category_names[] = $cat_item->name;
              echo $cat_item->name.'<br />';
            }
            ?>
            </div>
            <h3 class="min" style="text-align:left">Tagy</h3>
            <div class="aside-item-line">
            <?php
            $in_category_final = array();
            $category_names = array();

            foreach ($article->articles_tag->find_all() as $cat_item) {
              echo $cat_item->tag . '<br />';
            }
            ?>
            </div>
          </aside>  
          <div class="block-bottom aside-bottom"></div>                     
        </div>
        <?php if (count($comments_article) !== 0 || Auth::instance()->logged_in()): ?>
        <div class="block">
          <header>
            <h2>Komentáře</h2>
          </header>
          <!-- HTML5 sekce pro komentáře -->
          <section class="block-body">
            <?php if (Auth::instance()->logged_in()): ?>
            <form action="<?php echo url::base(); ?>comments/article_add" method="post">
              <ul>
                <li>
                  <textarea cols="10" rows="10" name="atext" class="text-big"></textarea>
                </li>
                <li class="submit"><?php echo Form::submit(NULL, 'Přidat komentář'); ?></li>
              </ul>
              <?php echo Form::hidden('aid', $article->id); ?>
            </form>
            <?php endif ?>
            <?php foreach ($comments_article as $item): ?>
            <div class="comment"><?php echo nl2br($item->text); ?></div>
            <div class="comment-bottom"><?php echo $item->username .' ('.Helpers_Photovoice::datum($item->date). ')'; ?></div>
            <?php endforeach ?>
            <br />
            <div class="clear-both"></div>
          </section>
        </div>
        <div class="block-bottom"></div>
        <?php endif ?>
      </section>